﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style x:Key="PlayButtonStyle" TargetType="ToggleButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <Ellipse Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Name="Circle">
                            <Ellipse.Fill>
                                <RadialGradientBrush GradientOrigin="0.5,0.5">
                                    <GradientStop Color="#F4F4F4" Offset="0.0" />
                                    <GradientStop Color="#ECECEC" Offset="0.9" />
                                    <GradientStop Color="#7A7A7A" Offset="1.0" />
                                </RadialGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                        <Border Name="Arrow" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="#505050" BorderThickness="0" Padding="6">
                            <Grid>
                                <Polygon Name="PlayIcon" Visibility="Visible" Margin="4,3,0,3" Grid.Row="0" Grid.Column="0" Points="0,0 0,1 1,0.5" Stretch="Fill" Fill="{Binding BorderBrush, ElementName=Arrow}"/>
                                <Grid Name="PauseIcon" Visibility="Collapsed" Margin="2,3,2,3">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition/>
                                        <ColumnDefinition/>
                                    </Grid.ColumnDefinitions>
                                    <Rectangle Margin="2,0" Grid.Row="0" Grid.Column="0" Stretch="Fill" Fill="{Binding BorderBrush, ElementName=Arrow}"/>
                                    <Rectangle Margin="2,0" Grid.Row="0" Grid.Column="1" Stretch="Fill" Fill="{Binding BorderBrush, ElementName=Arrow}"/>
                                </Grid>
                            </Grid>

                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="BorderBrush" TargetName="Arrow" Value="#BCBCBC"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Fill" TargetName="Circle">
                                <Setter.Value>
                                    <RadialGradientBrush GradientOrigin="0.5,0.5">
                                        <GradientStop Color="#DCDCDC" Offset="0.0" />
                                        <GradientStop Color="#ECECEC" Offset="0.9" />
                                        <GradientStop Color="#7A7A7A" Offset="1.0" />
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="ButtonBase.IsPressed" Value="True">
                            <Setter Property="Fill" TargetName="Circle">
                                <Setter.Value>
                                    <RadialGradientBrush GradientOrigin="0.5,0.5">
                                        <GradientStop Color="#BCBCBC" Offset="0.0" />
                                        <GradientStop Color="#E3E3E3" Offset="0.9" />
                                        <GradientStop Color="#7A7A7A" Offset="1.0" />
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="ToggleButton.IsChecked" Value="True">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="PlayIcon"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="PauseIcon"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MaximizeButtonStyle" TargetType="ToggleButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <ContentPresenter Name="Icon" Content="{DynamicResource MaximizeImage}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ToggleButton.IsChecked" Value="True">
                            <Setter Property="Content" TargetName="Icon" Value="{DynamicResource RestoreImage}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="PreviousButtonStyle" TargetType="ButtonBase">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <Ellipse Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Name="Circle">
                            <Ellipse.Fill>
                                <RadialGradientBrush GradientOrigin="0.5,0.5">
                                    <GradientStop Color="#F4F4F4" Offset="0.0" />
                                    <GradientStop Color="#ECECEC" Offset="0.9" />
                                    <GradientStop Color="#7A7A7A" Offset="1.0" />
                                </RadialGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                        <Border Name="Arrow" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="#505050" BorderThickness="0" Padding="6">
                            <Grid Margin="0,2,2,2">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition/>
                                </Grid.ColumnDefinitions>
                                <Polygon Grid.Row="0" Grid.Column="0" Points="0,0.5 1,0 1,1" Stretch="Fill" Fill="{Binding BorderBrush, ElementName=Arrow}"/>
                                <Polygon Grid.Row="0" Grid.Column="1" Points="0,0.5 1,0 1,1" Stretch="Fill" Fill="{Binding BorderBrush, ElementName=Arrow}"/>
                            </Grid>

                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="BorderBrush" TargetName="Arrow" Value="#BCBCBC"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Fill" TargetName="Circle">
                                <Setter.Value>
                                    <RadialGradientBrush GradientOrigin="0.5,0.5">
                                        <GradientStop Color="#DCDCDC" Offset="0.0" />
                                        <GradientStop Color="#ECECEC" Offset="0.9" />
                                        <GradientStop Color="#7A7A7A" Offset="1.0" />
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="ButtonBase.IsPressed" Value="True">
                            <Setter Property="Fill" TargetName="Circle">
                                <Setter.Value>
                                    <RadialGradientBrush GradientOrigin="0.5,0.5">
                                        <GradientStop Color="#BCBCBC" Offset="0.0" />
                                        <GradientStop Color="#E3E3E3" Offset="0.9" />
                                        <GradientStop Color="#7A7A7A" Offset="1.0" />
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NextButtonStyle" TargetType="ButtonBase">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <Ellipse Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Name="Circle">
                            <Ellipse.Fill>
                                <RadialGradientBrush GradientOrigin="0.5,0.5">
                                    <GradientStop Color="#F4F4F4" Offset="0.0" />
                                    <GradientStop Color="#ECECEC" Offset="0.9" />
                                    <GradientStop Color="#7A7A7A" Offset="1.0" />
                                </RadialGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                        <Border Name="Arrow" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="#505050" BorderThickness="0" Padding="6">
                            <Grid Margin="3,2,2,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition/>
                                </Grid.ColumnDefinitions>
                                <Polygon Grid.Row="0" Grid.Column="0" Points="1,1 0,2 0,0" Stretch="Fill" Fill="{Binding BorderBrush, ElementName=Arrow}"/>
                                <Polygon Grid.Row="0" Grid.Column="1" Points="1,1 0,2 0,0" Stretch="Fill" Fill="{Binding BorderBrush, ElementName=Arrow}"/>
                            </Grid>

                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="BorderBrush" TargetName="Arrow" Value="#BCBCBC"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Fill" TargetName="Circle">
                                <Setter.Value>
                                    <RadialGradientBrush GradientOrigin="0.5,0.5">
                                        <GradientStop Color="#DCDCDC" Offset="0.0" />
                                        <GradientStop Color="#ECECEC" Offset="0.9" />
                                        <GradientStop Color="#7A7A7A" Offset="1.0" />
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="ButtonBase.IsPressed" Value="True">
                            <Setter Property="Fill" TargetName="Circle">
                                <Setter.Value>
                                    <RadialGradientBrush GradientOrigin="0.5,0.5">
                                        <GradientStop Color="#BCBCBC" Offset="0.0" />
                                        <GradientStop Color="#E3E3E3" Offset="0.9" />
                                        <GradientStop Color="#7A7A7A" Offset="1.0" />
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="toggleOptionButtonStyle" TargetType="ToggleButton">
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="IsHitTestVisible" Value="False" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="LinkButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Foreground" Value="Blue" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <ContentPresenter/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Foreground" Value="Red" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="opacityToggleButton" TargetType="ToggleButton">
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="False">
                <Setter Property="Opacity" Value="0.5"></Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ImageButtonStyle" TargetType="{x:Type Button}" >
        <Setter Property="Cursor" Value="Hand"></Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.5"></Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>